package main

import (
	"fmt"
)

func worker(ch chan string) {
	ch <- "Hello from goroutine" // 发送数据到 channel
}

func main() {
	ch := make(chan string) // 创建一个无缓冲 channel

	go worker(ch) // 启动 goroutine

	msg := <-ch // 从 channel 接收数据
	fmt.Println(msg)
}
